home *** CD-ROM | disk | FTP | other *** search
/ ETO Development Tools 4 / ETO Development Tools 4.iso / Essentials / MacApp Documentation / MacApp.TECH$ Archives / 1991 / MacApp Apr 91 / MacApp.Tech$ 4⁄19⁄91 / 3472-C++ and Trace switch-Apr91 < prev    next >
Encoding:
Text File  |  1991-04-29  |  1.9 KB  |  41 lines  |  [TEXT/GEOL]

  1. Item    0305537                         15-April-91        10:12PDT
  2.  
  3. From:   V0678                           AGFA Compugraphic, F Giuffrida,VAR
  4.  
  5. To:     MACDTS                          Macintosh Developer Tech Supt
  6.         MACAPP.TECH$                    MacApp Technical
  7.  
  8. ------------------------------------------------------------------------------
  9.  
  10. Sub:    C++ and Trace switch problem
  11.  
  12. I think I have found a problem in the interface between the toolbox and
  13. MacApp/CPlus when compiling with "trace on." I have looked through the MacApp
  14. release notes and Tech Note #280, but have seen no reference to this problem.
  15.  
  16. The problem occurs when I attempt to select a substring in a TEditText view,
  17. i.e., select '23' in the view containing '1234'. When I compile with trace on,
  18. the program acts as if I had released the mouse button either immediately or
  19. after a 1/4 second or so.
  20.  
  21. Looking at the MacApp code, the selection highlighting is handled by TEClick
  22. called from TTEView.DoMouseCommand. A ClikLoop has been setup to call the
  23. global function ClickLoopForTTEView. Per Inside Mac, this function must return
  24. TRUE or TEClick will assume that a mouseUp has occured and stop tracking, i.e.,
  25. the symptom I'm seeing.
  26.  
  27. I looked at the assembler generated for this function and found a MOVE.B of the
  28. boolean return flag to the stack before returning. The caller, EPROM function
  29. ROM_TEClick, then checks the condition code 'Z' with a BEQ.S instruction rather
  30. than actually examining the return code.
  31.  
  32. Unfortunately, the "-trace on" flag causes a call to %_EP to occur just before
  33. returning from ClickLoopForTTEView. This call changes the condition code 'Z'
  34. (based on the value of the preserved D7); therefore, the returned condition
  35. codes are invalid. Usually 'Z' is 0 upon returning to ROM_TEClick, and the
  36. branch is taken to terminate the selection operation.
  37.  
  38. Mike Rubin
  39. Agfa Compugraphic
  40.  
  41.